package com.ourteam.product.model.domain;

import net.dao.IDataPopulateCallback;

import org.apache.commons.beanutils.BeanMap;
import org.apache.commons.lang.ArrayUtils;

import java.util.HashMap;

/**
 * Template Name : DTO数据对象
 * Template Version : 1
 * Template Last Modfiy Date : Tue Nov 07 10:29:34 IRKT 2017
 * Auto Generate Date : 2017-11-15 14:51:17
  * Warning ! This file will be overwrite when regenerate !
  *
 */
import java.util.Map;


public class ProductModelPackageBean implements java.io.Serializable {
    private static Map<String, String> mappedDaoFields = new HashMap<String, String>();

    static {
        mappedDaoFields.put("id",
            com.ourteam.product.model.dao.IProductModelPackageDAO.Id);

        mappedDaoFields.put("domainId",
            com.ourteam.product.model.dao.IProductModelPackageDAO.DomainId);

        mappedDaoFields.put("packageName",
            com.ourteam.product.model.dao.IProductModelPackageDAO.PackageName);

        mappedDaoFields.put("status",
            com.ourteam.product.model.dao.IProductModelPackageDAO.Status);

        mappedDaoFields.put("remarks",
            com.ourteam.product.model.dao.IProductModelPackageDAO.Remarks);

        mappedDaoFields.put("domainName",
            com.ourteam.product.model.dao.IProductModelPackageDAO.DomainName);

        mappedDaoFields.put("domainCode",
            com.ourteam.product.model.dao.IProductModelPackageDAO.DomainCode);

        mappedDaoFields.put("domainStatus",
            com.ourteam.product.model.dao.IProductModelPackageDAO.DomainStatus);

        mappedDaoFields.put("packageType",
            com.ourteam.product.model.dao.IProductModelPackageDAO.PackageType);

        mappedDaoFields.put("modelXML",
            com.ourteam.product.model.dao.IProductModelPackageDAO.ModelXML);

        mappedDaoFields.put("lastModifyTime",
            com.ourteam.product.model.dao.IProductModelPackageDAO.LastModifyTime);

        mappedDaoFields.put("lastModifierId",
            com.ourteam.product.model.dao.IProductModelPackageDAO.LastModifierId);

        mappedDaoFields.put("lastModifierName",
            com.ourteam.product.model.dao.IProductModelPackageDAO.LastModifierName);

        mappedDaoFields.put("submitterId",
            com.ourteam.product.model.dao.IProductModelPackageDAO.SubmitterId);

        mappedDaoFields.put("creatorName",
            com.ourteam.product.model.dao.IProductModelPackageDAO.CreatorName);

        mappedDaoFields.put("createTime",
            com.ourteam.product.model.dao.IProductModelPackageDAO.CreateTime);
    }

    private com.ourteam.product.model.dao.ProductModelPackage productModelPackage;

    public ProductModelPackageBean() {
        super();

        this.productModelPackage = new com.ourteam.product.model.dao.ProductModelPackage();
    }

    public ProductModelPackageBean(
        com.ourteam.product.model.dao.ProductModelPackage productModelPackage) {
        super();

        this.productModelPackage = productModelPackage;
    }

    protected BeanMap getBeanMap() {
        return new BeanMap(productModelPackage);
    }

    public static String getMappedDAOField(String aAttrName) {
        return mappedDaoFields.get(aAttrName);
    }

    public com.ourteam.product.model.dao.ProductModelPackage convertToProductModelPackage() {
        return this.productModelPackage;
    }

    public com.ourteam.product.model.dao.ProductModelPackage convertTo() {
        return this.productModelPackage;
    }

    /**
     * Get id
     *
     * @return long
     */
    public long getId() {
        return (long) this.productModelPackage.getId();
    }

    /**
     * Set id
     *
     * @parameter long
     */
    public void setId(long id) {
        this.productModelPackage.setId(id);
    }

    /**
     * Get domainId
     *
     * @return long
     */
    public long getDomainId() {
        return (long) this.productModelPackage.getDomainId();
    }

    /**
     * Set domainId
     *
     * @parameter long
     */
    public void setDomainId(long domainId) {
        this.productModelPackage.setDomainId(domainId);
    }

    /**
     * Get packageName
     *
     * @return String
     */
    public String getPackageName() {
        return (String) this.productModelPackage.getPackageName();
    }

    /**
     * Set packageName
     *
     * @parameter String
     */
    public void setPackageName(String packageName) {
        this.productModelPackage.setPackageName(packageName);
    }

    /**
     * Get status
     *
     * @return String
     */
    public String getStatus() {
        return (String) this.productModelPackage.getStatus();
    }

    /**
     * Set status
     *
     * @parameter String
     */
    public void setStatus(String status) {
        this.productModelPackage.setStatus(status);
    }

    /**
     * Get remarks
     *
     * @return String
     */
    public String getRemarks() {
        return (String) this.productModelPackage.getRemarks();
    }

    /**
     * Set remarks
     *
     * @parameter String
     */
    public void setRemarks(String remarks) {
        this.productModelPackage.setRemarks(remarks);
    }

    /**
     * Get domainName
     *
     * @return String
     */
    public String getDomainName() {
        return (String) this.productModelPackage.getDomainName();
    }

    /**
     * Get domainCode
     *
     * @return String
     */
    public String getDomainCode() {
        return (String) this.productModelPackage.getDomainCode();
    }

    /**
     * Get domainStatus
     *
     * @return String
     */
    public String getDomainStatus() {
        return (String) this.productModelPackage.getDomainStatus();
    }

    /**
     * Get packageType
     *
     * @return String
     */
    public String getPackageType() {
        return (String) this.productModelPackage.getPackageType();
    }

    /**
     * Set packageType
     *
     * @parameter String
     */
    public void setPackageType(String packageType) {
        this.productModelPackage.setPackageType(packageType);
    }

    /**
     * Get modelXML
     *
     * @return String
     */
    public String getModelXML() {
        return (String) this.productModelPackage.getModelXML();
    }

    /**
     * Set modelXML
     *
     * @parameter String
     */
    public void setModelXML(String modelXML) {
        this.productModelPackage.setModelXML(modelXML);
    }

    /**
     * Get lastModifyTime
     *
     * @return java.util.Date
     */
    public java.util.Date getLastModifyTime() {
        return (java.util.Date) this.productModelPackage.getLastModifyTime();
    }

    /**
     * Set lastModifyTime
     *
     * @parameter java.util.Date
     */
    public void setLastModifyTime(java.util.Date lastModifyTime) {
        this.productModelPackage.setLastModifyTime(lastModifyTime);
    }

    /**
     * Get lastModifierId
     *
     * @return long
     */
    public long getLastModifierId() {
        return (long) this.productModelPackage.getLastModifierId();
    }

    /**
     * Set lastModifierId
     *
     * @parameter long
     */
    public void setLastModifierId(long lastModifierId) {
        this.productModelPackage.setLastModifierId(lastModifierId);
    }

    /**
     * Get lastModifierName
     *
     * @return String
     */
    public String getLastModifierName() {
        return (String) this.productModelPackage.getLastModifierName();
    }

    /**
     * Set lastModifierName
     *
     * @parameter String
     */
    public void setLastModifierName(String lastModifierName) {
        this.productModelPackage.setLastModifierName(lastModifierName);
    }

    /**
     * Get submitterId
     *
     * @return long
     */
    public long getSubmitterId() {
        return (long) this.productModelPackage.getSubmitterId();
    }

    /**
     * Set submitterId
     *
     * @parameter long
     */
    public void setSubmitterId(long submitterId) {
        this.productModelPackage.setSubmitterId(submitterId);
    }

    /**
     * Get creatorName
     *
     * @return String
     */
    public String getCreatorName() {
        return (String) this.productModelPackage.getCreatorName();
    }

    /**
     * Set creatorName
     *
     * @parameter String
     */
    public void setCreatorName(String creatorName) {
        this.productModelPackage.setCreatorName(creatorName);
    }

    /**
     * Get createTime
     *
     * @return java.util.Date
     */
    public java.util.Date getCreateTime() {
        return (java.util.Date) this.productModelPackage.getCreateTime();
    }

    /**
     * Set createTime
     *
     * @parameter java.util.Date
     */
    public void setCreateTime(java.util.Date createTime) {
        this.productModelPackage.setCreateTime(createTime);
    }

    public int hashCode() {
        return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
    }

    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        } // end if

        if ((obj instanceof ProductModelPackageBean) == false) {
            return false;
        } // end if

        ProductModelPackageBean other = (ProductModelPackageBean) obj;

        boolean isEqual = false;

        com.ourteam.product.model.dao.ProductModelPackage tempProductModelPackage =
            other.convertToProductModelPackage();

        if ((tempProductModelPackage == null) ||
                (this.productModelPackage == null)) {
            isEqual = false;
        } else if ((tempProductModelPackage == this.productModelPackage) ||
                tempProductModelPackage.equals(this.productModelPackage)) {
            isEqual = true;
        } else {
            isEqual = false;
        }

        return isEqual;
    }

    public static ProductModelPackageBean[] toArray(
        com.ourteam.product.model.dao.ProductModelPackage[] aProductModelPackages) {
        return toArray(aProductModelPackages, null);
    }

    public static ProductModelPackageBean[] toArray(
        com.ourteam.product.model.dao.ProductModelPackage[] aProductModelPackages,
        IDataPopulateCallback aCallBack) {
        if (ArrayUtils.isEmpty(aProductModelPackages)) {
            return new ProductModelPackageBean[0];
        }

        int length = aProductModelPackages.length;

        ProductModelPackageBean[] beans = new ProductModelPackageBean[length];

        for (int i = 0; i < length; i++) {
            beans[i] = new ProductModelPackageBean(aProductModelPackages[i]);

            if (aCallBack != null) {
                aCallBack.populate(beans[i],
                    new Object[] { aProductModelPackages[i] });
            }
        }

        return beans;
    }
}
